-- ==
-- input {
--   [[[0i32, 1i32], [2i32, 3i32], [4i32, 5i32], [6i32, 7i32]],
--    [[8i32, 9i32], [10i32, 11i32], [12i32, 13i32], [14i32, 15i32]]]
-- }
-- output {
--   [[[0, 2, 4, 6], [8, 10, 12, 14]], [[1, 3, 5, 7], [9, 11, 13, 15]]]
-- }
-- input {
--   [[[7i32, 10i32, 2i32],
--     [4i32, 3i32, 1i32],
--     [8i32, 4i32, 4i32],
--     [0i32, 9i32, 9i32],
--     [0i32, 1i32, 3i32],
--     [2i32, 5i32, 10i32],
--     [0i32, 5i32, 0i32]],
--    [[5i32, 7i32, 6i32],
--     [2i32, 2i32, 3i32],
--     [4i32, 4i32, 7i32],
--     [6i32, 10i32, 10i32],
--     [5i32, 6i32, 10i32],
--     [5i32, 1i32, 6i32],
--     [1i32, 3i32, 9i32]],
--    [[3i32, 2i32, 9i32],
--     [4i32, 0i32, 7i32],
--     [4i32, 6i32, 5i32],
--     [5i32, 8i32, 5i32],
--     [10i32, 8i32, 7i32],
--     [5i32, 8i32, 7i32],
--     [3i32, 6i32, 8i32]]]
-- }
-- output {
--   [[[7i32, 4i32, 8i32, 0i32, 0i32, 2i32, 0i32], [5i32, 2i32,
--   4i32, 6i32, 5i32, 5i32, 1i32], [3i32, 4i32, 4i32, 5i32, 10i32,
--   5i32, 3i32]], [[10i32, 3i32, 4i32, 9i32, 1i32, 5i32, 5i32],
--   [7i32, 2i32, 4i32, 10i32, 6i32, 1i32, 3i32], [2i32, 0i32, 6i32,
--   8i32, 8i32, 8i32, 6i32]], [[2i32, 1i32, 4i32, 9i32, 3i32, 10i32,
--   0i32], [6i32, 3i32, 7i32, 10i32, 10i32, 6i32, 9i32], [9i32, 7i32,
--   5i32, 5i32, 7i32, 7i32, 8i32]]]
-- }
-- compiled random input { [2][10][10]i32 } auto output
-- compiled random input { [2][64][4]i32 } auto output
-- compiled random input { [2][4][64]i32 } auto output
-- compiled random input { [2][64][64]i32 } auto output
-- compiled random input { [64][2][64]i32 } auto output
-- compiled random input { [64][64][2]i32 } auto output
-- compiled random input { [128][128][128]i32 } auto output

def main xss : [][][]i32 =
  xss |> map transpose |> transpose
